
class NetResponse<T extends dynamic> {
  bool? _success = false;
  String? _message = "";
  T? _data = null;

  bool get success => _success??false;

  String get message => _message??"";

  T? get data => _data;

  NetResponse.fromJson(Map<String, dynamic> data) {
     this._success = data['success'];
     this._message = data['message'];
     this._data = data['data'];
  }
}

class NetListResponse<T extends dynamic> {
  bool? _success = false;
  String? _message = "";
  List<T>? _data = null;

  bool get success => _success??false;

  String get message => _message??"";

  List<T>? get data => _data;

  NetListResponse.fromJson(Map<String, dynamic> data) {
    this._success = data['success'];
    this._message = data['message'];
    this._data = data['data'].cast<T>();
  }
}